package: general waybeam encoder package for Infinity6E and Infinity6C - #110
package: general waybeam encoder package for Infinity6E and Infinity6C#110snokvist wants to merge 1 commit into
Conversation
|
Good afternoon. |
Buildroot package building the OpenIPC/waybeam_venc H.265 video encoder and streamer for SigmaStar Infinity6E (SSC338Q/SSC30KQ) and Infinity6C (SSC378QE). The SoC backend is selected from OPENIPC_SOC_FAMILY. The source is MIT-licensed. Installs /usr/bin/waybeam, /usr/bin/json_cli, /etc/waybeam.json and /etc/init.d/S95waybeam. On Infinity6C it also installs the encoder's own imx335/imx415 sensor modules as sensor_imx*_mipi.ko and the matching imx335.bin/imx415.bin, since there are no in-tree modules for these sensors; the package is ordered after sigmastar-osdrv-sensors and sigmastar-osdrv-infinity6c so those modules install over the stock ones. waybeam and Majestic cannot be built together (depends on !BR2_PACKAGE_MAJESTIC): both drive the same sensor and encoder, and the SigmaStar OSDRV MI libraries are installed only when Majestic is not selected. The package ships no libraries; OSDRV provides them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
9b84b52 to
f60a355
Compare
|
I am happy to move this to OpenIPC/firmware PR instead if thats a more suitable place for it. At least one other uses has confirmed this package works for building waybeam. |
Migrated from OpenIPC/builder#110. waybeam is a standalone H.265 encoder and streamer for Infinity6E (SSC338Q/SSC30KQ) and Infinity6C (SSC378QE), selected from OPENIPC_SOC_FAMILY. It serves whole SoC families rather than one retail model, so it belongs in the shared tree rather than in builder. Three things changed on the way over, all of them to clear gates this tree enforces and builder does not: - The site pointed at OpenIPC/waybeam_venc, since renamed to OpenIPC/waybeam. - The sensor modules shipped as prebuilt .ko lifted from the source tree, which is a binary without a buildable source, and had to match the target kernel's vermagic by hand -- the builder PR left an I6E boot check as the open gate for exactly that reason. They are now compiled from drivers/*.c against the kernel this build just produced, so vermagic cannot drift. The SigmaStar headers they need come from the OpenIPC/sensors submodule, hence WAYBEAM_GIT_SUBMODULES. The install path follows LINUX_VERSION_PROBED rather than a literal 4.9.84 / 5.10.61. - The Infinity6C ISP tuning bins are not installed. Their own README records them as pulled off a running SSC378QE, which is the binary-extracted-from- firmware case this tree refuses. isp.sensorBin ships empty, so the encoder falls back to SDK default tuning and video still comes up without them. No mainline defconfig can select this: it depends on !BR2_PACKAGE_MAJESTIC and every sigmastar board in ALL_BOARDS sets Majestic on, so it is listed in ci-matrix NOT_BUILT with that reason.
|
This has moved to OpenIPC/firmware — draft PR: OpenIPC/firmware#2332 @snokvist, the package serves whole SoC families rather than one retail model, Three things changed on the way over, all to clear gates firmware enforces and The sensor modules are now compiled from source. The prebuilt $(MAKE) -C $(@D)/drivers sensor SOC=$(WAYBEAM_SOC) \
KSRC="$(LINUX_DIR)" CROSS="$(TARGET_CROSS)"A local The Infinity6C ISP tuning bins are not installed. Third and minor: the site follows the What it still needs is hardware, which is why it's a draft: an SSC338Q or SSC30KQ |
Migrated from OpenIPC/builder#110. waybeam is a standalone H.265 encoder and streamer for Infinity6E (SSC338Q/SSC30KQ) and Infinity6C (SSC378QE), selected from OPENIPC_SOC_FAMILY. It serves whole SoC families rather than one retail model, so it belongs in the shared tree rather than in builder. Three things changed on the way over, all of them to clear gates this tree enforces and builder does not: - The site pointed at OpenIPC/waybeam_venc, since renamed to OpenIPC/waybeam. - The sensor modules shipped as prebuilt .ko lifted from the source tree, which is a binary without a buildable source, and had to match the target kernel's vermagic by hand -- the builder PR left an I6E boot check as the open gate for exactly that reason. They are now compiled from drivers/*.c against the kernel this build just produced, so vermagic cannot drift. The SigmaStar headers they need come from the OpenIPC/sensors submodule, hence WAYBEAM_GIT_SUBMODULES. The install path follows LINUX_VERSION_PROBED rather than a literal 4.9.84 / 5.10.61. - The Infinity6C ISP tuning bins are not installed. They were pulled off a running SSC378QE, and are byte-identical to this tree's own copies in sigmastar-osdrv-infinity6c, so vendoring them round-tripped our files back at us. Nothing is lost: with isp.sensorBin empty waybeam resolves /etc/sensors/<sensor>.bin itself, the same stock tuning Majestic loads. No mainline defconfig can select this: it depends on !BR2_PACKAGE_MAJESTIC and every sigmastar board in ALL_BOARDS sets Majestic on, so it is listed in ci-matrix NOT_BUILT with that reason.
Migrated from OpenIPC/builder#110. waybeam is a standalone H.265 encoder and streamer for Infinity6E (SSC338Q/SSC30KQ) and Infinity6C (SSC378QE), selected from OPENIPC_SOC_FAMILY. It serves whole SoC families rather than one retail model, so it belongs in the shared tree rather than in builder. Three things changed on the way over, all of them to clear gates this tree enforces and builder does not: - The site pointed at OpenIPC/waybeam_venc, since renamed to OpenIPC/waybeam. - The sensor modules shipped as prebuilt .ko lifted from the source tree, which is a binary without a buildable source, and had to match the target kernel's vermagic by hand -- the builder PR left an I6E boot check as the open gate for exactly that reason. They are now compiled from drivers/*.c against the kernel this build just produced, so vermagic cannot drift. The SigmaStar headers they need come from the OpenIPC/sensors submodule, hence WAYBEAM_GIT_SUBMODULES. The install path follows LINUX_VERSION_PROBED rather than a literal 4.9.84 / 5.10.61. - The Infinity6C ISP tuning bins are not installed. They were pulled off a running SSC378QE, and are byte-identical to this tree's own copies in sigmastar-osdrv-infinity6c, so vendoring them round-tripped our files back at us. Nothing is lost: with isp.sensorBin empty waybeam resolves /etc/sensors/<sensor>.bin itself, the same stock tuning Majestic loads. No mainline defconfig can select this: it depends on !BR2_PACKAGE_MAJESTIC and every sigmastar board in ALL_BOARDS sets Majestic on, so it is listed in ci-matrix NOT_BUILT with that reason.
waybeam: add the SigmaStar encoder package Migrated from OpenIPC/builder#110. waybeam is a standalone H.265 encoder and streamer for Infinity6E (SSC338Q/SSC30KQ) and Infinity6C (SSC378QE), selected from OPENIPC_SOC_FAMILY. It serves whole SoC families rather than one retail model, so it belongs in the shared tree rather than in builder. Three things changed on the way over, all of them to clear gates this tree enforces and builder does not: - The site pointed at OpenIPC/waybeam_venc, since renamed to OpenIPC/waybeam. - The sensor modules shipped as prebuilt .ko lifted from the source tree, which is a binary without a buildable source, and had to match the target kernel's vermagic by hand -- the builder PR left an I6E boot check as the open gate for exactly that reason. They are now compiled from drivers/*.c against the kernel this build just produced, so vermagic cannot drift. The SigmaStar headers they need come from the OpenIPC/sensors submodule, hence WAYBEAM_GIT_SUBMODULES. The install path follows LINUX_VERSION_PROBED rather than a literal 4.9.84 / 5.10.61. - The Infinity6C ISP tuning bins are not installed. They were pulled off a running SSC378QE, and are byte-identical to this tree's own copies in sigmastar-osdrv-infinity6c, so vendoring them round-tripped our files back at us. Nothing is lost: with isp.sensorBin empty waybeam resolves /etc/sensors/<sensor>.bin itself, the same stock tuning Majestic loads. No mainline defconfig can select this: it depends on !BR2_PACKAGE_MAJESTIC and every sigmastar board in ALL_BOARDS sets Majestic on, so it is listed in ci-matrix NOT_BUILT with that reason. waybeam: offer Infinity6E only, not Infinity6C Hardware testing on an SSC378QE (#2332) found the encoder running against MI libraries it was not built for. waybeam's Infinity6C backend targets the 2024-06-18 SigmaStar MI set; sigmastar-osdrv-infinity6c installs 2022-09-07. The pipeline streams on those, but AE never actuates and the frame is black -- mean luma 2.05/255 measured through the encoder's own snapshot endpoint, against 153.91 with the 2024 libraries, everything else held constant. So the package's claim to need no libraries of its own holds only where the revision OSDRV ships is one the backend targets. On Infinity6E it is; on Infinity6C it is not, and a package that builds, installs and streams black is worse than one that is not offered. Config.in drops the I6C dependency and says why, and the unreachable maruko branch comes out of the .mk with the measurement recorded so it is not rediscovered from scratch. Reconciling the two revisions belongs in sigmastar-osdrv-infinity6c, where bumping the MI libraries affects every I6C board -- majestic links them too -- and needs evidence of its own. I6C returns here once they agree. Verified: ssc338q_lite with Majestic off still builds -- waybeam and json_cli install, sensor_imx335_mipi.ko lands at /lib/modules/4.9.84/sigmastar with the kernel's vermagic, rootfs 5180KB/8192KB. waybeam: stop reporting a failed stop as success wait_exit() fell out of its loop with a warning and no failing status, and stop() printed OK regardless, so `restart` ran start() against a process that had not died. start()'s own duplicate-instance guard then found it still running, printed "already running" and returned 0 -- a requested restart that silently never happened, which is exactly the failure mode the three-name matching in this script exists to avoid. wait_exit() now returns 1 on timeout. stop() escalates to SIGKILL once, and only claims OK when nothing is left; restart is `stop && start`. Found by the Qodo review on #2332. Co-authored-by: snokvist <joakim.snokvist@gmail.com>
Adds a Buildroot package
waybeam: an H.265 video encoder and streamer forSigmaStar Infinity6E (SSC338Q/SSC30KQ) and Infinity6C (SSC378QE). The SoC
backend is selected from
OPENIPC_SOC_FAMILY. The source is MIT-licensed andtracks
OpenIPC/waybeam_vencmaster (currently v0.40.1).Installs:
/usr/bin/waybeam/usr/bin/json_cli(config editor)/etc/waybeam.json/etc/init.d/S95waybeamUnlocked sensor modules (both families). Waybeam ships its own imx335/imx415
drivers with higher-FPS sensor modes:
sensor_imx{335,415}_star6e.koover the stock
/lib/modules/4.9.84/sigmastar/sensor_imx*_mipi.konames(up to 144 fps IMX335 / 100 fps IMX415). No custom ISP bins — the SDK/stock
tuning applies (
isp.sensorBindefaults to empty).sensor_imx{335,415}_mipi.koplus thematching
/etc/sensors/imx335.binandimx415.bin, since there are noin-tree modules for these sensors on I6C.
Both are ordered after
sigmastar-osdrv-sensorsand the family'ssigmastar-osdrv-infinity6{e,c}so the modules install over the stock ones.waybeam and Majestic cannot be built together (
depends on !BR2_PACKAGE_MAJESTIC): both drive the same sensor and encoder, and theSigmaStar OSDRV MI libraries are installed to
/usr/libonly when Majesticis not selected. The package ships no libraries; OSDRV provides them.
Defaults in
/etc/waybeam.json: UDP RTP output enabled toudp://192.168.1.10:5600, resolutionauto(sensor native), ROI and audiodisabled.
isp.sensorBinis empty, which is valid — the encoder falls backto the SDK default ISP tuning, so video comes up on first boot. The config is
kept in sync with the v0.40.1 schema (carries the
attitudesection; the deadframeLostfield, removed from the encoder in v0.19.0, was dropped).Verified with scoped Buildroot builds on both families (Majestic off). Each
uses the Buildroot toolchain; the Infinity6C build installs the binary,
json_cli, both sensor modules, both ISP bins, config and init script:
Verification note for the Star6E sensor modules: they ship prebuilt
(stripped
--strip-debug) and must match the target kernel's vermagic. Theywere built against the OpenIPC Infinity6E 4.9.84 kernel; a scoped I6E build +
boot check that
sensor_imx335_mipi.ko/imx415.koinsmodcleanly and thenew modes enumerate is the remaining gate (the Maruko modules were validated
the same way).